import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;

public class TestMode {

    public static void ECinit(){
        ECPoint P;
        ECCOperator ec=new ECCOperator();
        ECPoint G=new ECPoint(new BigInteger("2"),new BigInteger("4"));
        P=ec.multiply(G,new BigInteger("123456"));
        System.out.println("P:"+P.toString());
        BigInteger s=new BigInteger(CharacterUtils.getRandomInteger(16));
        System.out.println("s:"+s.toString());
        ECPoint PK=ec.multiply(P,new BigInteger("4839958896485379"));
        System.out.println("PK:"+PK);

    }
    public static void testWrite() {
        Map<String,String> idMaps=new HashMap<String,String>();
        idMaps.put("C11",CharacterUtils.getRandomString(8));
        idMaps.put("B1",CharacterUtils.getRandomString(8));
        idMaps.put("A",CharacterUtils.getRandomString(8));
        FileUtil.writeLine("IDTable",idMaps);
    }

    public static void testRead(){
        System.out.println(FileUtil.readTag("IDTable","C11"));
    }

    public static void initIDTables(){
        Map<String,String> idMaps=new HashMap<String,String>();
        idMaps.put("A",CharacterUtils.getRandomString(8));
        for(int i=1;i<9;i++){
            String B="B";
            B=B+i;
            idMaps.put(B,CharacterUtils.getRandomString(8));
        }
        for(int i=1;i<9;i++){
            for(int j=1;j<9;j++){
                String C="C";
                C=C+i+j;
                idMaps.put(C,CharacterUtils.getRandomString(8));
            }
        }
        FileUtil.writeLine("IDTable",idMaps);
    }

    public static void main(String[] args) {
        ECinit();
    }
}
